package vista;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.WindowConstants;
import javax.swing.border.LineBorder;
import javax.swing.SwingUtilities;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class AltaSector extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JButton cancelar;
	private JButton aceptar;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JTextField nombre;
	private JComboBox salon;
	private JSeparator jSeparator2;
	private JButton mesas;
	private JSeparator jSeparator1;
	private JLabel jLabel3;
	private JPanel jPanel2;
	private JTextField salonTextfield;

	/**
	 * Auto-generated main method to display this JFrame
	 */
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				AltaSector inst = new AltaSector();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}

	public AltaSector() {
		super();
		initGUI();
	}

	public AltaSector(String sucursal, String salon) {
		super();
		initGUI(sucursal, salon);
	}

	private void initGUI(final String sucursal2, final String salon2) {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setLocationRelativeTo(null);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1);
				jPanel1.setBounds(-6, 69, 450, 250);
				jPanel1.setBackground(new java.awt.Color(206, 223, 183));
				jPanel1.setLayout(null);
				{
					aceptar = new JButton();
					jPanel1.add(aceptar);
					aceptar.setText("Aceptar");
					aceptar.setBounds(247, 195, 87, 23);
					aceptar.setBackground(new java.awt.Color(170, 200, 130));
					aceptar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("aceptar.actionPerformed, event="
											+ evt);
							// TODO add your code for aceptar.actionPerformed
						}
					});
				}
				{
					cancelar = new JButton();
					jPanel1.add(cancelar);
					cancelar.setText("Cancelar");
					cancelar.setBounds(345, 195, 88, 23);
					cancelar.setBackground(new java.awt.Color(170, 200, 130));
					cancelar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cancelar.actionPerformed, event="
											+ evt);
							// TODO add your code for cancelar.actionPerformed
						}
					});
				}
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
					jLabel2.setText("Nombre");
					jLabel2.setBounds(30, 26, 78, 16);
				}
				{
					nombre = new JTextField();
					jPanel1.add(nombre);
					nombre.setBounds(106, 21, 166, 23);
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jLabel3.setText("Salon");
					jLabel3.setBounds(29, 67, 67, 16);
				}
				{
					salonTextfield = new JTextField();
					jPanel1.add(salonTextfield);
					salonTextfield.setText(salon2);
					salonTextfield.setEditable(false);
					salonTextfield.setBounds(108, 63, 164, 23);

				}
				{
					jSeparator1 = new JSeparator();
					jPanel1.add(jSeparator1);
					jSeparator1.setBounds(0, 118, 450, 10);
				}
				{
					mesas = new JButton();
					jPanel1.add(mesas);
					mesas.setText("Asignar Mesas");
					mesas.setBounds(108, 126, 244, 23);
					mesas.setBackground(new java.awt.Color(170, 200, 130));
					mesas.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							AltaMesa a = new AltaMesa(sucursal2, salon2, nombre
									.getText());
							a.setVisible(true);
						}
					});
				}
				{
					jSeparator2 = new JSeparator();
					jPanel1.add(jSeparator2);
					jSeparator2.setBounds(0, 156, 472, 10);
				}
			}
			{
				jPanel2 = new JPanel();
				getContentPane().add(jPanel2);
				jPanel2.setBounds(0, 0, 444, 70);
				jPanel2.setBackground(new java.awt.Color(172, 201, 133));
				jPanel2.setLayout(null);
				{
					jLabel1 = new JLabel();
					jPanel2.add(jLabel1);
					jLabel1.setText("Sector");
					jLabel1.setBounds(14, 19, 428, 45);
					jLabel1.setFont(new java.awt.Font("Andalus", 0, 36));
				}
			}
			pack();
			this.setSize(460, 343);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setLocationRelativeTo(null);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1);
				jPanel1.setBounds(-6, 69, 450, 250);
				jPanel1.setBackground(new java.awt.Color(206, 223, 183));
				jPanel1.setLayout(null);
				{
					aceptar = new JButton();
					jPanel1.add(aceptar);
					aceptar.setText("Aceptar");
					aceptar.setBounds(247, 195, 87, 23);
					aceptar.setBackground(new java.awt.Color(170, 200, 130));
					aceptar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("aceptar.actionPerformed, event="
											+ evt);
							// TODO add your code for aceptar.actionPerformed
						}
					});
				}
				{
					cancelar = new JButton();
					jPanel1.add(cancelar);
					cancelar.setText("Cancelar");
					cancelar.setBounds(345, 195, 88, 23);
					cancelar.setBackground(new java.awt.Color(170, 200, 130));
					cancelar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cancelar.actionPerformed, event="
											+ evt);
							// TODO add your code for cancelar.actionPerformed
						}
					});
				}
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
					jLabel2.setText("Nombre");
					jLabel2.setBounds(30, 26, 78, 16);
				}
				{
					nombre = new JTextField();
					jPanel1.add(nombre);
					nombre.setBounds(106, 21, 166, 23);
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jLabel3.setText("Salon");
					jLabel3.setBounds(29, 67, 67, 16);
				}
				{
					ComboBoxModel sucursalModel = new DefaultComboBoxModel(
							new String[] { "Item One", "Item Two" });
					salon = new JComboBox();
					jPanel1.add(salon);
					salon.setModel(sucursalModel);
					salon.setBounds(108, 63, 164, 23);
					salon.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out.println("salon.actionPerformed, event="
									+ evt);
							// TODO add your code for salon.actionPerformed
						}
					});
				}
				{
					jSeparator1 = new JSeparator();
					jPanel1.add(jSeparator1);
					jSeparator1.setBounds(0, 118, 450, 10);
				}
				{
					mesas = new JButton();
					jPanel1.add(mesas);
					mesas.setText("Asignar Mesas");
					mesas.setBounds(108, 126, 244, 23);
					mesas.setBackground(new java.awt.Color(170, 200, 130));
					mesas.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							AltaMesa a = new AltaMesa();
							a.setVisible(true);
						}
					});
				}
				{
					jSeparator2 = new JSeparator();
					jPanel1.add(jSeparator2);
					jSeparator2.setBounds(0, 156, 472, 10);
				}
			}
			{
				jPanel2 = new JPanel();
				getContentPane().add(jPanel2);
				jPanel2.setBounds(0, 0, 444, 70);
				jPanel2.setBackground(new java.awt.Color(172, 201, 133));
				jPanel2.setLayout(null);
				{
					jLabel1 = new JLabel();
					jPanel2.add(jLabel1);
					jLabel1.setText("Sector");
					jLabel1.setBounds(14, 19, 428, 45);
					jLabel1.setFont(new java.awt.Font("Andalus", 0, 36));
				}
			}
			pack();
			this.setSize(460, 343);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
